import request from '/@/utils/request';

export function useMaoriApi() {
    return {
        productList: (data: object) => {
            return request({
                url: '/api/calculate/maori/product/list',
                method: 'post',
                data,
            });
        },

        productDetail: (data: object) => {
            return request({
                url: '/api/calculate/maori/product/detail',
                method: 'post',
                data,
            });
        },

        editProduct: (data: object) => {
            return request({
                url: '/api/calculate/maori/product/edit',
                method: 'post',
                data,
            });
        },

        deleteProduct: (data: object) => {
            return request({
                url: '/api/calculate/maori/product/delete',
                method: 'post',
                data,
            });
        },

        productInstanceList: (data: object) => {
            return request({
                url: '/api/calculate/maori/product/instance/list',
                method: 'post',
                data,
            });
        },

        totalInstance: (data: object) => {
            return request({
                url: '/api/calculate/maori/product/instance/totalInstance',
                method: 'post',
                data,
            });
        },

        saveProductInstances: (data: object) => {
            return request({
                url: '/api/calculate/maori/product/instance/save',
                method: 'post',
                data,
            });
        },

        calculateProductInstances: (data: object) => {
            return request({
                url: '/api/calculate/maori/product/instance/calculate',
                method: 'post',
                data,
            });
        },

        addProductInstances: (data: object) => {
            return request({
                url: '/api/calculate/maori/product/instance/addInstance',
                method: 'post',
                data,
            });
        },
        
        deleteProductInstance: (data: object) => {
            return request({
                url: '/api/calculate/maori/product/instance/delete',
                method: 'post',
                data,
            });
        },

    };
}